{extend name="layout/main" /}

{block name="header"}

{/block}

{block name="content"}
<section class="panel">
    <header class="panel-heading">
        <h4>参与者列表</h4>
    </header>
    <div class="panel-body" style="padding-bottom: 50px">
        <form class="form-horizontal" action="">
            <div class="form-group">

                <div class="col-xs-3 no-pd-r">
                    <input type="text" id="keyword" value="{$Request.get.keyword}" name="keyword" class="form-control" placeholder="请输入会员账号搜索">
                    <input type="hidden" value="{$Request.get.id}" name="id" >
                </div>
                <button type="submit" class="btn btn-color">搜索</button>

            </div>
        </form>
        <table class="table table-bordered table-striped no-margin">
            <thead>
            <tr>
                <th class="text-center">参与者</th>
                <th class="text-center">参加号码</th>
                <th class="text-center">花费积分</th>
                <th class="text-center">加入时间</th>
                <th class="text-center">是否中奖</th>
            </tr>
            </thead>
            <tbody>
            {if !empty($goodsLists)}
            {foreach $goodsLists as $entity}
            <tr>
                <td class="text-center">手机号:{$entity->getUserMobile($entity->user_id)}<br>昵称:{$entity->getUserName($entity->user_id)}</td>
                <td class="text-center">{$entity->number}</td>
                <td class="text-center">{$entity->integral}</td>
                <td class="text-center">{:date("Y-m-d H:i:s",$entity->createtime)}</td>

                <td class="text-center">
                {if $entity->is_win == 0}
                <a data-url="{:url('win_yes',['rush_order_id'=>$entity->rush_order_id,'id'=>$entity->id])}" onclick="main.ajaxDelete(this)" data-msg="确定此用户中奖？" class="btn btn-xs btn-success">设为中奖</a>
                {else /}
                <a data-url="{:url('win_no',['rush_order_id'=>$entity->rush_order_id])}" onclick="main.ajaxDelete(this)" data-msg="确定取消此用户中奖？" class="btn btn-xs btn-danger">取消中奖</a>
                {/if}
                </td>

            </tr>
            {/foreach}
            {else /}
            <tr class="text-center">
                <td colspan="5">暂无数据</td>
            </tr>
            {/if}
            </tbody>
        </table>
        <div class="page">
            {:htmlspecialchars_decode($goodsLists->render())}
        </div>
    </div>
</section>
{/block}


{block name="footer"}
    <script>
        function showContent(e){
            $.dialog({
                title: '商品内容',
                content: $(e).attr('data-content')
            });
        }
    </script>
{/block}